package com.woniu.service.goldcommand;

import com.woniu.outlet.redis.po.GoldRela;
import com.woniu.util.ApplicationContextHolder;
import lombok.Data;

import java.util.List;

/**
 * @description:
 * @author: my
 * @time: 2021/4/23 16:02
 */
@Data
public class GoldsCommand {
    private GoldsCommandHandler handler;

    public GoldsCommand(){
        this.handler =
                ApplicationContextHolder.getApplicationContext().getBean(GoldsCommandHandler.class);
    }

    public List<GoldRela> execute() throws Exception{
        return this.handler.action(this);
    }
}
